Skip to content

D007 define unit test for v4.0.0 compatibility layer#438

Open
syntron wants to merge 6 commits intoOpenModelica:masterfrom
syntron:D007-test_v400
Open

D007 define unit test for v4.0.0 compatibility layer#438
syntron wants to merge 6 commits intoOpenModelica:masterfrom
syntron:D007-test_v400

Conversation

@syntron
Copy link
Copy Markdown
Contributor

@syntron syntron commented Feb 27, 2026

this adds a second unittest branch (test_v400) to check for v4.0.0 compatibility

should be merged after D008! (PR #437)

syntron added 3 commits April 30, 2026 22:11
[ModelicaSystemABC] reorder code in __init__()

[ModelicaSystem*] linter fixes
[OMTypedParser] compatibility layer

[__init__/OMCSession] prepare compatibility layer

[ModelicaSystem] define as compatibility layer

[ModelicaSystemCmd] define as compatibility layer
add workflow to run unittests in ./tests

tests from v4.0.0

fix test_linearization from v4.0.0

flake8 error: test_linearization.py:71:5: E741 ambiguous variable name 'l'

this was fixed in: 'update usage of flake8 (OpenModelica#357)' (SHA1: 70cb446)

fix test_ModelicaSystem - needed adaptions:

* convert OMCPath to pathlib.Path
* use correct exceptions

define test workflows for v400
Copy link
Copy Markdown
Member

@adeas31 adeas31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we need new workflows to test v4.0.0?
What is the purpose of Test_v400.yml, Test_v400_py310.yml and Test_v4xx.yml?

We can test bu just adding an extra step,

- name: Run pytest
        uses: pavelzw/pytest-action@v2
        with:
          verbose: true
          emoji: true
          job-summary: true
          custom-arguments: '-v ./tests'
          click-to-expand: true
          report-title: 'Test Report'

- name: Run pytest for v4.0.0
        uses: pavelzw/pytest-action@v2
        with:
          verbose: true
          emoji: true
          job-summary: true
          custom-arguments: '-v ./tests_v400'
          click-to-expand: true
          report-title: 'Test Report'

@syntron
Copy link
Copy Markdown
Contributor Author

syntron commented May 6, 2026

I don't understand why we need new workflows to test v4.0.0? What is the purpose of Test_v400.yml, Test_v400_py310.yml and Test_v4xx.yml?

We can test bu just adding an extra step,

- name: Run pytest
[...]
- name: Run pytest for v4.0.0
[...]

Quite right; I tested it for myself using the different workflows to activate them as needed with corresponding settings. Would you prefere an update according to this proposal?

@syntron
Copy link
Copy Markdown
Contributor Author

syntron commented May 6, 2026

updated PR - however, this will increase the time to run the unittests (factor 2?)

@adeas31
Copy link
Copy Markdown
Member

adeas31 commented May 6, 2026

I don't understand why we need new workflows to test v4.0.0? What is the purpose of Test_v400.yml, Test_v400_py310.yml and Test_v4xx.yml?
We can test bu just adding an extra step,

- name: Run pytest
[...]
- name: Run pytest for v4.0.0
[...]

Quite right; I tested it for myself using the different workflows to activate them as needed with corresponding settings. Would you prefere an update according to this proposal?

Yes please. We might remove v4.0.0 tests in future.

@syntron
Copy link
Copy Markdown
Contributor Author

syntron commented May 6, 2026

It fails here but should work on top of latest master (see also test in my fork: https://github.com/syntron/OMPython/actions/runs/25456426602) - updated with the fix included

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants